//
//  HomeViewController.m
//  WFClothes
//
//  Created by pan Shiyu on 12-11-8.
//  Copyright (c) 2012年 pan Shiyu. All rights reserved.
//

#import "HomeViewController.h"
#import "CaptureViewController.h"
#import "ListViewController.h"
#import "SettingViewController.h"

@implementation HomeViewController


- (void)viewDidLoad
{
    [super viewDidLoad];
	self.title = @"Home";
    
    // Create Buttons.
    UIButton* btnCapture = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    btnCapture.frame = CGRectMake(60.0f, 40.0f, 200.0f, 40.0f);
    [btnCapture setTitle:@"拍摄" forState:UIControlStateNormal];
    [btnCapture addTarget:self action:@selector(onCapture) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btnCapture];
    
    UIButton* btnList = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    btnList.frame = CGRectMake(60.0f, 100.0f, 200.0f, 40.0f);
    [btnList setTitle:@"媒体库" forState:UIControlStateNormal];
    [btnList addTarget:self action:@selector(onList) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btnList];
    
    UIButton* btnSetting = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    btnSetting.frame = CGRectMake(60.0f, 160.0f, 200.0f, 40.0f);
    [btnSetting setTitle:@"设置" forState:UIControlStateNormal];
    [btnSetting addTarget:self action:@selector(onSetting) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btnSetting];
    
}


#pragma mark - btn selector

- (void)onCapture{
    CaptureViewController* nextPagePage = [[CaptureViewController alloc]init];
    [self.navigationController pushViewController:nextPagePage animated:YES];
    [nextPagePage release];
    
}

- (void)onList{
    ListViewController* nextPagePage = [[ListViewController alloc]init];
    [self.navigationController pushViewController:nextPagePage animated:YES];
    [nextPagePage release];
}

- (void)onSetting{
    SettingViewController* nextPagePage = [[SettingViewController alloc]init];
    [self.navigationController pushViewController:nextPagePage animated:YES];
    [nextPagePage release];
}


@end
